package com.xueyi.common.message.mq.callback.producer;


import com.xueyi.common.message.mq.RedisMQTemplate;
import com.xueyi.common.message.mq.callback.message.CallbackChannelMessage;
import com.xueyi.common.message.mq.callback.message.CallbackStreamMessage;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Slf4j
@Component
public class CallbackProducer {

    @Resource
    private RedisMQTemplate redisMQTemplate;

    public void sendStreamCallbackMessage(CallbackStreamMessage message) {
        redisMQTemplate.send(message);
    }

    public void sendChannelCallbackMessage(CallbackChannelMessage message) {
        redisMQTemplate.send(message);
    }

}
